home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-11 | 11.3 KB | 493 lines | [TEXT/MPS ] |
- ;
- ; File: PPCToolbox.a
- ;
- ; Copyright: © 1984-1994 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__PPCTOOLBOX__') = 'UNDEFINED' THEN
- __PPCTOOLBOX__ SET 1
-
-
- IF &TYPE('__APPLETALK__') = 'UNDEFINED' THEN
- include 'AppleTalk.a'
- ENDIF
- ; include 'Types.a' ;
- ; include 'ConditionalMacros.a' ;
- ; include 'OSUtils.a' ;
- ; include 'MixedMode.a' ;
- ; include 'Memory.a' ;
-
- ppcServiceRealTime EQU 1
-
- ppcNoLocation EQU 0 ; There is no PPCLocName
- ppcNBPLocation EQU 1 ; Use AppleTalk NBP
- ppcNBPTypeLocation EQU 2 ; Used for specifying a location name type during PPCOpen only
-
- ppcByCreatorAndType EQU 1 ; Port type is specified as colloquial Mac creator and type
- ppcByString EQU 2 ; Port type is in pascal string format
-
- ; Values returned for request field in PPCInform call
- ; Values returned for requestType field in PPCInform call
- ppcLocalOrigin EQU 1 ; session originated from this machine
- ppcRemoteOrigin EQU 2 ; session originated from remote machine
-
- PPCPortRec RECORD 0
- nameScript ds.w 1 ; script of name
- name ds.b 33 ; name of port as seen in browser
- portKindSelector ds.w 1 ; which variant
- VariantLevel0Begin EQU *
- portTypeStr ds.b 33 ; pascal type string
- ORG VariantLevel0Begin
- portCreator ds.l 1
- portType ds.l 1
-
- sizeof EQU 72
- ENDR
-
- LocationNameRec RECORD 0
- locationKindSelector ds.w 1 ; which variant
- VariantLevel0Begin EQU *
- nbpEntity ds EntityName ; NBP name entity
- ORG VariantLevel0Begin
- nbpType ds.b 33 ; just the NBP type string, for PPCOpen
- sizeof EQU 104
- ENDR
-
- PortInfoRec RECORD 0
- filler1 ds.b 1
- authRequired ds.b 1
- name ds.l 18
- sizeof EQU 74
- ENDR
-
- PPCOpenPBRec RECORD 0
- qLink ds.l 1
- csCode ds.w 1
- intUse ds.w 1
- intUsePtr ds.l 1
- ioCompletion ds.l 1
- ioResult ds.w 1
- Reserved ds.l 5
- portRefNum ds.w 1 ; 38 <-- Port Reference
- filler1 ds.l 1
- serviceType ds.b 1 ; 44 --> Bit field describing the requested port service
- resFlag ds.b 1 ; Must be set to 0
- portName ds.l 1 ; 46 --> PortName for PPC
- locationName ds.l 1 ; 50 --> If NBP Registration is required
- networkVisible ds.b 1 ; 54 --> make this network visible on network
- nbpRegistered ds.b 1 ; 55 <-- The given location name was registered on the network
- sizeof EQU 56
- ENDR
-
- PPCInformPBRec RECORD 0
- qLink ds.l 1
- csCode ds.w 1
- intUse ds.w 1
- intUsePtr ds.l 1
- ioCompletion ds.l 1
- ioResult ds.w 1
- Reserved ds.l 5
- portRefNum ds.w 1 ; 38 --> Port Identifier
- sessRefNum ds.l 1 ; 40 <-- Session Reference
- serviceType ds.b 1 ; 44 <-- Status Flags for type of session, local, remote
- autoAccept ds.b 1 ; 45 --> if true session will be accepted automatically
- portName ds.l 1 ; 46 --> Buffer for Source PPCPortRec
- locationName ds.l 1 ; 50 --> Buffer for Source LocationNameRec
- userName ds.l 1 ; 54 --> Buffer for Soure user's name trying to link.
- userData ds.l 1 ; 58 <-- value included in PPCStart's userData
- requestType ds.b 1 ; 62 <-- Local or Network
- filler ds.b 1
- sizeof EQU 64
- ENDR
-
- PPCStartPBRec RECORD 0
- qLink ds.l 1
- csCode ds.w 1
- intUse ds.w 1
- intUsePtr ds.l 1
- ioCompletion ds.l 1
- ioResult ds.w 1
- Reserved ds.l 5
- portRefNum ds.w 1 ; 38 --> Port Identifier
- sessRefNum ds.l 1 ; 40 <-- Session Reference
- serviceType ds.b 1 ; 44 <-- Actual service method (realTime)
- resFlag ds.b 1 ; 45 --> Must be set to 0
- portName ds.l 1 ; 46 --> Destination portName
- locationName ds.l 1 ; 50 --> NBP or NAS style service location name
- rejectInfo ds.l 1 ; 54 <-- reason for rejecting the session request
- userData ds.l 1 ; 58 --> Copied to destination PPCInform parameter block
- userRefNum ds.l 1 ; 62 --> userRefNum (obtained during login process)
- sizeof EQU 66
- ENDR
-
- PPCAcceptPBRec RECORD 0
- qLink ds.l 1
- csCode ds.w 1
- intUse ds.w 1
- intUsePtr ds.l 1
- ioCompletion ds.l 1
- ioResult ds.w 1
- Reserved ds.l 5
- filler1 ds.w 1
- sessRefNum ds.l 1 ; 40 --> Session Reference
- sizeof EQU 44
- ENDR
-
- PPCRejectPBRec RECORD 0
- qLink ds.l 1
- csCode ds.w 1
- intUse ds.w 1
- intUsePtr ds.l 1
- ioCompletion ds.l 1
- ioResult ds.w 1
- Reserved ds.l 5
- filler1 ds.w 1
- sessRefNum ds.l 1 ; 40 --> Session Reference
- filler2 ds.w 1
- filler3 ds.l 1
- filler4 ds.l 1
- rejectInfo ds.l 1 ; 54 --> reason for rejecting the session request
- sizeof EQU 58
- ENDR
-
- PPCWritePBRec RECORD 0
- qLink ds.l 1
- csCode ds.w 1
- intUse ds.w 1
- intUsePtr ds.l 1
- ioCompletion ds.l 1
- ioResult ds.w 1
- Reserved ds.l 5
- filler1 ds.w 1
- sessRefNum ds.l 1 ; 40 --> Session Reference
- bufferLength ds.l 1 ; 44 --> Length of the message buffer
- actualLength ds.l 1 ; 48 <-- Actual Length Written
- bufferPtr ds.l 1 ; 52 --> Pointer to message buffer
- more ds.b 1 ; 56 --> if more data in this block will be written
- filler2 ds.b 1
- userData ds.l 1 ; 58 --> Message block userData Uninterpreted by PPC
- blockCreator ds.l 1 ; 62 --> Message block creator Uninterpreted by PPC
- blockType ds.l 1 ; 66 --> Message block type Uninterpreted by PPC
- sizeof EQU 70
- ENDR
-
- PPCReadPBRec RECORD 0
- qLink ds.l 1
- csCode ds.w 1
- intUse ds.w 1
- intUsePtr ds.l 1
- ioCompletion ds.l 1
- ioResult ds.w 1
- Reserved ds.l 5
- filler1 ds.w 1
- sessRefNum ds.l 1 ; 40 --> Session Reference
- bufferLength ds.l 1 ; 44 --> Length of the message buffer
- actualLength ds.l 1 ; 48 <-- Actual length read
- bufferPtr ds.l 1 ; 52 --> Pointer to message buffer
- more ds.b 1 ; 56 <-- if true more data in this block to be read
- filler2 ds.b 1
- userData ds.l 1 ; 58 <-- Message block userData Uninterpreted by PPC
- blockCreator ds.l 1 ; 62 <-- Message block creator Uninterpreted by PPC
- blockType ds.l 1 ; 66 <-- Message block type Uninterpreted by PPC
- sizeof EQU 70
- ENDR
-
- PPCEndPBRec RECORD 0
- qLink ds.l 1
- csCode ds.w 1
- intUse ds.w 1
- intUsePtr ds.l 1
- ioCompletion ds.l 1
- ioResult ds.w 1
- Reserved ds.l 5
- filler1 ds.w 1
- sessRefNum ds.l 1 ; 40 --> Session Reference
- sizeof EQU 44
- ENDR
-
- PPCClosePBRec RECORD 0
- qLink ds.l 1
- csCode ds.w 1
- intUse ds.w 1
- intUsePtr ds.l 1
- ioCompletion ds.l 1
- ioResult ds.w 1
- Reserved ds.l 5
- portRefNum ds.w 1 ; 38 --> Port Identifier
- sizeof EQU 40
- ENDR
-
- IPCListPortsPBRec RECORD 0
- qLink ds.l 1
- csCode ds.w 1
- intUse ds.w 1
- intUsePtr ds.l 1
- ioCompletion ds.l 1
- ioResult ds.w 1
- Reserved ds.l 5
- filler1 ds.w 1
- startIndex ds.w 1 ; 40 --> Start Index
- requestCount ds.w 1 ; 42 --> Number of entries to be returned
- actualCount ds.w 1 ; 44 <-- Actual Number of entries to be returned
- portName ds.l 1 ; 46 --> PortName Match
- locationName ds.l 1 ; 50 --> NBP or NAS type name to locate the Port Location
- bufferPtr ds.l 1 ; 54 --> Pointer to a buffer requestCount*sizeof(PortInfo) bytes big
- sizeof EQU 58
- ENDR
-
- PPCParamBlockRec RECORD 0
- VariantLevel0Begin EQU *
- openParam ds PPCOpenPBRec
- ORG VariantLevel0Begin
- informParam ds PPCInformPBRec
- ORG VariantLevel0Begin
- startParam ds PPCStartPBRec
- ORG VariantLevel0Begin
- acceptParam ds PPCAcceptPBRec
- ORG VariantLevel0Begin
- rejectParam ds PPCRejectPBRec
- ORG VariantLevel0Begin
- writeParam ds PPCWritePBRec
- ORG VariantLevel0Begin
- readParam ds PPCReadPBRec
- ORG VariantLevel0Begin
- endParam ds PPCEndPBRec
- ORG VariantLevel0Begin
- closeParam ds PPCClosePBRec
- ORG VariantLevel0Begin
- listPortsParam ds IPCListPortsPBRec
- sizeof EQU 70
- ENDR
-
- IF GENERATING68K THEN
- Macro
- _PPCInit
- moveq #0,d0
- dc.w $A0DD
- EndM
- ELSE
- IMPORT PPCInit
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCOpenSync
- moveq #1,d0
- dc.w $A0DD
- EndM
- ELSE
- IMPORT PPCOpenSync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCOpenAsync
- moveq #1,d0
- dc.w $A4DD
- EndM
- ELSE
- IMPORT PPCOpenAsync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCInformSync
- moveq #3,d0
- dc.w $A0DD
- EndM
- ELSE
- IMPORT PPCInformSync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCInformAsync
- moveq #3,d0
- dc.w $A4DD
- EndM
- ELSE
- IMPORT PPCInformAsync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCStartSync
- moveq #2,d0
- dc.w $A0DD
- EndM
- ELSE
- IMPORT PPCStartSync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCStartAsync
- moveq #2,d0
- dc.w $A4DD
- EndM
- ELSE
- IMPORT PPCStartAsync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCAcceptSync
- moveq #4,d0
- dc.w $A0DD
- EndM
- ELSE
- IMPORT PPCAcceptSync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCAcceptAsync
- moveq #4,d0
- dc.w $A4DD
- EndM
- ELSE
- IMPORT PPCAcceptAsync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCRejectSync
- moveq #5,d0
- dc.w $A0DD
- EndM
- ELSE
- IMPORT PPCRejectSync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCRejectAsync
- moveq #5,d0
- dc.w $A4DD
- EndM
- ELSE
- IMPORT PPCRejectAsync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCWriteSync
- moveq #6,d0
- dc.w $A0DD
- EndM
- ELSE
- IMPORT PPCWriteSync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCWriteAsync
- moveq #6,d0
- dc.w $A4DD
- EndM
- ELSE
- IMPORT PPCWriteAsync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCReadSync
- moveq #7,d0
- dc.w $A0DD
- EndM
- ELSE
- IMPORT PPCReadSync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCReadAsync
- moveq #7,d0
- dc.w $A4DD
- EndM
- ELSE
- IMPORT PPCReadAsync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCEndSync
- moveq #8,d0
- dc.w $A0DD
- EndM
- ELSE
- IMPORT PPCEndSync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCEndAsync
- moveq #8,d0
- dc.w $A4DD
- EndM
- ELSE
- IMPORT PPCEndAsync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCCloseSync
- moveq #9,d0
- dc.w $A0DD
- EndM
- ELSE
- IMPORT PPCCloseSync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCCloseAsync
- moveq #9,d0
- dc.w $A4DD
- EndM
- ELSE
- IMPORT PPCCloseAsync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _IPCListPortsSync
- moveq #10,d0
- dc.w $A0DD
- EndM
- ELSE
- IMPORT IPCListPortsSync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _IPCListPortsAsync
- moveq #10,d0
- dc.w $A4DD
- EndM
- ELSE
- IMPORT IPCListPortsAsync
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _PPCBrowser
- move.w #$0D00,d0
- dc.w $A82B
- EndM
- ELSE
- IMPORT PPCBrowser
- ENDIF
-
- ENDIF ; __PPCTOOLBOX__
-